digraph all_service {
	edge [fontname="Microsoft YaHei"];
    node [fontname="Microsoft YaHei" style=filled color="Moccasin"]
    
   
    <#list services as service>
    	<#if service.publicAccess>
    		<#assign peripheries="2">
    	<#else>
    		<#assign peripheries="1">
    	</#if>
    	<#if service.introduced>
    		<#assign fontcolor="purple">
    	<#else>
    		<#assign fontcolor="black">
    	</#if>
    	<#if service.database>
    		<#assign shape="house">
            <#assign fillColor="GoldEnrod">
    	<#else>
    		<#assign shape="ellipse">
            <#assign fillColor="Moccasin">
    	</#if>      
    ${service.name} [label = "${service.title}",peripheries="${peripheries}",fontcolor="${fontcolor}",color="${fillColor}",shape="${shape}" ]
    </#list>
       
    <#list services as service>
    	<#list service.relations as relation>
    	<#if relation.relationType == "PullFrom">
    		<#assign color="blue">
    		<#assign arraw="inv">
    	<#elseif relation.relationType == "PushTo">
    		<#assign color="green">
    		<#assign arraw="normal">
    	<#else>
    		<#assign color="black">
    		<#assign arraw="normal">
    	</#if>
    	

   	${relation.nameA} -> ${relation.nameB} [label="${relation.desc}",fontsize="8",color="${color}",arrowhead="${arraw}"]
    	</#list>
    </#list>

}